<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use App\Models\LogHelper;

class Controller extends BaseController
{
    public function __construct()
    {
        header( 'Access-Control-Allow-Origin:*' );
        header('Access-Control-Allow-Headers:X-Requested-With');
    }

    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    /**
     * 日志方法类
     */
    public function log($data, $log_type = 'warning', $log_format = "Y_m_d"){
        LogHelper::log($data,$log_type,$log_format);
    }
}
